package com.quanyan.operative.mapper;

import com.quanyan.operative.model.resp.RespPrize;
import com.quanyan.operative.model.resp.RespPrizeActivity;
import com.quanyan.operative.model.resp.RespUserHitEggInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 双蛋节活动
 * <p>
 * Created by huadongyang on 2016/12/6.
 */
public interface DoubleEggFestivalMapper {
    /**
     * 获取活动列表
     *
     * @return
     */
    List<RespPrizeActivity> getPrizeActivityList();

    /**
     * 获取奖品列表
     *
     * @param activityId 活动Id
     * @return
     */
    List<RespPrize> getPrizeList(Integer activityId);

    /**
     * 获取好友砸蛋列表
     *
     * @param uid
     * @return
     */
    List<RespUserHitEggInfo> getUserHitEggList(@Param("uid") Integer uid, @Param("activityId") Integer activityId);

    /**
     * 好友砸蛋数目
     *
     * @param uid
     * @return
     */
    int userHitEggCount(Integer uid);

    /**
     * 更新奖品库存
     *
     * @param prizeId 奖品Id
     * @param version
     * @return
     */
    int updatePrizeQuantity(@Param("prizeId") Integer prizeId, @Param("version") Integer version);

    /**
     * 获取奖品数量
     * @param uid
     * @param activityId
     * @param prizeId
     * @return
     */
    int userPrizeNum(@Param("uid") Integer uid, @Param("activityId") Integer activityId, @Param("prizeId") Integer prizeId);
}
